#include "tests.h"

#include <cstdio>
#include <string>
using std::string;

#include "parser.h"
#include "engine_impl.h"

char buffer[1000];

int main() {
  // RunAllTests();

  Parser parser(new EngineImpl());

  printf("Terminal ready. Type exit to quit\n");
  while (true) {
    gets(buffer);
    string result = parser.Execute(buffer);
    printf("%s\n", result.c_str());
    if ((string)buffer == "exit") {
      printf("Bye!\n");
      break;
    }
  }
}
